define(function(require){
    var $ = require('$');
    /*用户中心下拉显示*/
   	var $userSelect = $('.user-select');
   	$('.avatar,.user-select').on({
		'mouseenter':function(){
			$userSelect.stop().show(200);
	   	},
	   	'mouseleave':function() {
	   		$userSelect.stop().hide(200);
	   	}
	});
	/*我的动态切换*/
	var $tidingsTabs = $('.tidings-nav li'),
	$underline = $('.underline'),
	$tabContent = $('.my-tidings-content');
	$tidingsTabs.each(function(){
		var $this = $(this);
		$this.on('click',function(){
			var left = $this.position().left + ($this.width() + 32 - $underline.width())/2;
			$underline.animate({left:left + "px"});
			$tabContent.eq($this.index()).show().siblings().hide();
		});
		
	});
	
   	
});